﻿@model AutoClub.Models.LogOnModel

@if (!Request.IsAuthenticated){
    <p> Ingrese email y password para ingresar. <br />
     @Html.ActionLink("Registrese", "Register","Account") en caso de no tener cuenta de usuario.</p>

    @Html.ValidationSummary(true, "Ingreso erroneo. Corrija los errores y vuelva a intentarlo.")

    using (Html.BeginForm("LogOn","Account",FormMethod.Post))    {
    <div>
        <fieldset>
            <legend>Información para ingresar</legend>
            <div class="editor-label">
                @Html.LabelFor(m => m.Email)
            </div>
            <div class="editor-field">
                @Html.TextBoxFor(m => m.Email)
                @Html.ValidationMessageFor(m => m.Email)
            </div>
            <div class="editor-label">
                @Html.LabelFor(m => m.Password)
            </div>
            <div class="editor-field">
                @Html.PasswordFor(m => m.Password)
                @Html.ValidationMessageFor(m => m.Password)
            </div>
            <div class="editor-label">
                @Html.CheckBoxFor(m => m.RememberMe, new { @class = "inputcheck"})
                @Html.LabelFor(m => m.RememberMe)
            </div>
            <p>
                <input type="submit" value="Ingresar" />
            </p>
        </fieldset>
    </div>
    }
}
else
{ 
  <h2>Index</h2>
    <p>Buena Onda    </p>
}

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>